import request from '@/utils/request'

// 查询复刻任务列表
export function listReprintTask(data) {
  return request({
    url: '/console/dbReprintTask/list',
    method: 'post',
    data: data
  })
}


export function dbReprintTask(data) {
  return request({
    url: '/console/dbReprintTask/list',
    method: 'post',
    data: data
  })
}

// 查询复刻任务详细
export function getReprintTask(data) {
  return request({
    url: '/console/dbReprintTask/getInfo',
    method: 'post',
    data: data
  })
}

// 新增复刻任务
export function addReprintTask(data) {
  return request({
    url: '/console/dbReprintTask/add',
    method: 'post',
    data: data
  })
}

// 修改复刻任务
export function updateReprintTask(data) {
  return request({
    url: '/console/dbReprintTask/edit',
    method: 'post',
    data: data
  })
}

// 删除复刻任务
export function delReprintTask(data) {
  return request({
    url: '/console/reprintTask/remove',
		method: 'post',
		data: data
  })
}


// 复刻管理-开始复刻接口
export function startReprintTask(data) {
  return request({
    url: '/console/dbReprintTask/startReprintTask',
		method: 'post',
		data: data
  })
}


// 复刻任务
export function getIpByNodeId(data) {
  return request({
    url: '/console/reprintTask/getIpByNodeId',
		method: 'post',
		data: data
  })
}


// 复刻管理-获取复刻任务进度、状态信息
export function reprintProgress(data) {
  return request({
    url: '/console/reprintTask/reprintProgress',
		method: 'post',
		data: data
  })
}

// 复刻管理-获取复刻任务error信息
export function errorInfo(data) {
  return request({
    url: '/console/dbReprintTask/errorInfo',
		method: 'post',
		data: data
  })
}


// 复刻管理-获重启状态日志
export function checkLogInfo(data) {
  return request({
    url: '/console/dbReprintTask/checkLogInfo',
		method: 'post',
		data: data
  })
}

// 复刻管理-重启
export function rebootSys(data) {
  return request({
    url: '/console/dbReprintTask/rebootSys',
		method: 'post',
		data: data
  })
}


// 1. 启动增量同步任务
export function startReprintTaskWindow2(data) {
  return request({
    url: '/console/reprintTask/reprintWindows2Update',
		method: 'post',
		data: data
  })
}


// 2. 增量同步任务进度
export function updateDataProgress(data) {
  return request({
    url: '/console/reprintTask/updateDataProgress',
		method: 'post',
		data: data
  })
}


// 查询是否到达了接口上限
export function nodeLicenseVerify(data) {
  return request({
    url: '/console/hessNode/nodeLicenseVerify ',
		method: 'post',
		data: data
  })
}



// 启动迁移
export function startMigrate(data) {
  return request({
    url: '/console/reprintTask/startMigrate',
		method: 'post',
		data: data
  })
}


// 启动迁移 获取迁移的进度
export function getMigrateProcess(data) {
  return request({
    url: '/console/reprintTask/getMigrateProcess',
		method: 'post',
		data: data
  })
}

// 停止迁移
export function suspendReprint(data) {
  return request({
    url: '/console/dbReprintTask/suspendReprint',
		method: 'post',
		data: data
  })
}

// 编辑window 复刻任务
export function editRepint(data) {
  return request({
    url: '/console/dbReprintTask/edit',
		method: 'post',
		data: data
  })
}


// 停止后的重置任务
export function initTask(data) {
  return request({
    url: '/console/dbReprintTask/initTask',
		method: 'post',
		data: data
  })
}

// 开启复刻任务前  检查端口连接是否正常
export function checkNodeNet(data) {
  return request({
    url: '/console/reprintTask/checkNodeNet',
		method: 'post',
		data: data
  })
}

// 启动测试
export function customShell(data) {
  return request({
    url: '/console/reprintTask/customShell',
		method: 'post',
		data: data
  })
}

// 数据同步-开始比对
export function checkDiff(data) {
  return request({
    url: '/console/reprintTask/checkDiff ',
    method: 'post',
    data: data
  })
}
// 数据同步-同步
export function reprintNodeUpdate(data) {
  return request({
    url: '/console/reprintTask/reprintNodeUpdate ',
    method: 'post',
    data: data
  })
}

// 复刻任务日志
export function reprintlog(data) {
  return request({
    url: '/console/reprintTask/reprintlog',
    method: 'post',
    data: data
  })
}

// 更新重启中状态
export function isrebootSys(data) {
  return request({
    url: '/console/dbReprintTask/isrebootSys',
    method: 'post',
    data: data
  })
}

// 更新开始比对任务
export function reprintUpdateData(data) {
  return request({
    url: '/console/reprintTask/reprintUpdateData',
    method: 'post',
    data: data
  })
}

// 开始增量任务
export function startIncrementWindow2(data) {
  return request({
    url: '/console/dbReprintTask/startIncrementWindow2',
    method: 'post',
    data: data
  })
}

// 获取token
export function getXmToken(data) {
  return request({
    url: '/console/dbReprintTask/xmToken',
    method: 'post',
    data: data
  })
}

// 检测是否在迁移系统配置任务
export function dbConfigState(data) {
  return request({
    url: '/console/dbReprintTask/dbConfigState',
    method: 'post',
    data: data
  })
}


// 查询数据库增量任务队列状态、剩余数量
export function queueState(data) {
  return request({
    url: '/console/dbReprintTask/queueState',
    method: 'post',
    data: data
  })
}
